generate Unrealized Sale Txn
Generate a sale transaction as if all remaining shares of a security were sold off as of a specific date. This method should be used for securities using the average cost method.
Return
A hypothetical sale of all remaining shares as of the given date.
Parameters
sec Acct
The security account.
shares
The share balance as of the given date.
asof Date
The date to compute the hypothetical sale for.
fun generateUnrealizedSaleTxn(secAcct: Account, lotsRemaining: Hashtable<String, AvailableSharesTracker>, asofDate: Int): SplitTxn
Generate a sale transaction as if all remaining shares of a security were sold off as of a specific date. This method should be used for securities using lot-based cost tracking.
Return
A hypothetical sale of all remaining shares as of the given date.
Parameters
sec Acct
The security account.
lots Remaining
A list of the remaining lots to be sold, or null to use average cost basis.
asof Date
The date to compute the hypothetical sale for.